$blue: #3190e8;
$bc: #e4e4e4;
$fc:#fff;

// 背景图片地址和大小
@mixin bis($url) {
  background-image: url($url);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

@mixin borderRadius($radius) {
  -webkit-border-radius: $radius;
  -moz-border-radius: $radius;
  -ms-border-radius: $radius;
  -o-border-radius: $radius;
  border-radius: $radius;
}

//定位全屏
@mixin allcover {
  position: absolute;
  top: 0;
  right: 0;
}

//内容上下左右居中
@mixin hcenter {
  display: -webkit-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  -webkit-align-items: center;
  align-items: center;
}

//定位上下左右居中
@mixin center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

//定位上下居中
@mixin ct {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

//定位左右居中
@mixin cl {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

//定位底部
@mixin bom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
}

//定位底部 固定屏幕
@mixin bomg {
  position: fixed;
  bottom: 0;
  left: 50%;
  width: 100%;
  transform: translateX(-50%);
}

//宽高
@mixin wh($width, $height) {
  width: $width;
  height: $height;
}

//字体大小、行高、字体
@mixin font($size, $line-height, $family: 'Microsoft YaHei') {
  font: #{$size}/#{$line-height} $family;
}

//字体大小，颜色
@mixin sc($size, $color) {
  font-size: $size;
  color: $color;
}

//背景颜色，字体颜色
@mixin bg($bg, $color) {
  background-color: $bg;
  color: $color;
}

//flex 布局和 子元素 对其方式
@mixin fj($type: space-between) {
  display: flex;
  justify-content: $type;
}

// 图片处理
@mixin imgBox($width, $height) {
  width: $width;
  height: $height;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  img {
    max-width: 100%;
    max-height: 100%;
  }
}


// 渐变按钮
@mixin jbbtn($left, $right, $pleft, $pright) {
  background: linear-gradient(to right, $left, $right);
  color: #fff;
  border-radius: 5px;

  &:active {
    background: linear-gradient(to right, $pleft, $pright);
  }
}
